﻿using DAL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class Category_BLL
    {
        Category_DAL category_DAL = new Category_DAL();
        public IEnumerable<Category> SearchCategoryList()
        {
            return category_DAL.SearchCategoryList();
        }

        public bool Add(Category category)
        {
            return category_DAL.Add(category);
        }

        public Category GetById(Int64 id)
        {
            return category_DAL.GetById(id);
        }

        public bool Update(string name, Int64 categoryId)
        {
            return category_DAL.Update(name, categoryId);
        }

        public bool Delete(Int64 categoryId)
        {
            return category_DAL.Delete(categoryId);
        }
    }
}
